<link rel="stylesheet" type="text/css" href="/css/weixin.css">
<link rel="stylesheet" type="text/css" href="/css/appmsg.css">
<div class="clearfix">
    <div class="menu_preview_area senior_graphics_area">
        <div class="mobile_menu_preview senior_graphics_preview">
            <div class="mobile_hd tc">高级图文</div>
            <div class="mobile_bd">
                <div class="appmsg_content">
                    <!--<div class="appmsg_item js_appmsg_item has_thumb active">
                        <img class="js_appmsg_thumb appmsg_thumb" src="https://mmbiz.qlogo.cn/mmbiz/BdVPxSsuDZHGtw6KPhJyDF2uYsic4KofGJw5HWLZkj6V21CCApa2jgQSh0wz3JK5Y7FMg5F5qctkW1sicwtCtScw/0?wx_fmt=jpeg"
                        data-src="http://mmbiz.qpic.cn/mmbiz/BdVPxSsuDZHGtw6KPhJyDF2uYsic4KofGJw5HWLZkj6V21CCApa2jgQSh0wz3JK5Y7FMg5F5qctkW1sicwtCtScw/0?wx_fmt=jpeg">
                        <h4 class="appmsg_title">
                            <a href="http://mp.weixin.qq.com/s?__biz=MzAwMTYwNDMwNg==&amp;mid=404664029&amp;idx=1&amp;sn=70863e19cc651cc149903fe2d618e61d#rd"
                            target="_blank">
                                美味“烧”不尽，优惠“烤”不完。
                            </a>
                        </h4>
                        <div class="actions-wrap">
                            <span class="action edit">编辑</span>
                        </div>
                    </div>
                    <div class="appmsg_item js_appmsg_item has_thumb">
                        <img class="js_appmsg_thumb appmsg_thumb" src="https://mmbiz.qlogo.cn/mmbiz/BdVPxSsuDZHGtw6KPhJyDF2uYsic4KofG9MqSO9nwLHDHaDMAKpsFuPJIN8cK3ObyuSLmKxA13QhRbZd1iad6M5Q/0?wx_fmt=jpeg"
                        data-src="http://mmbiz.qpic.cn/mmbiz/BdVPxSsuDZHGtw6KPhJyDF2uYsic4KofG9MqSO9nwLHDHaDMAKpsFuPJIN8cK3ObyuSLmKxA13QhRbZd1iad6M5Q/0?wx_fmt=jpeg">
                        <h4 class="appmsg_title">
                            <a href="http://mp.weixin.qq.com/s?__biz=MzAwMTYwNDMwNg==&amp;mid=404664029&amp;idx=2&amp;sn=31dcfcaf84f795113af7200e0dac9cd4#rd"
                            target="_blank">
                                雅厨雅座，美食美客
                            </a>
                        </h4>
                        <div class="actions-wrap">
                            <span class="action edit">编辑</span>
                        </div>
                    </div>
                    <div class="appmsg_item js_appmsg_item has_thumb">
                        <img class="js_appmsg_thumb appmsg_thumb" src="https://mmbiz.qlogo.cn/mmbiz/BdVPxSsuDZHGtw6KPhJyDF2uYsic4KofGgXk4bnoAmUuBIVric2VgIglCCUWbcZKXUV87zThNshlicQfamCssiaBBQ/0?wx_fmt=jpeg"
                        data-src="http://mmbiz.qpic.cn/mmbiz/BdVPxSsuDZHGtw6KPhJyDF2uYsic4KofGgXk4bnoAmUuBIVric2VgIglCCUWbcZKXUV87zThNshlicQfamCssiaBBQ/0?wx_fmt=jpeg">
                        <h4 class="appmsg_title">
                            <a href="http://mp.weixin.qq.com/s?__biz=MzAwMTYwNDMwNg==&amp;mid=404664029&amp;idx=3&amp;sn=2f6176f770afe0680ac3670be5cfe3cc#rd"
                            target="_blank">
                                饭菜穿肠过，礼让心中留
                            </a>
                        </h4>
                        <div class="actions-wrap">
                            <span class="action edit">编辑</span>
                        </div>
                    </div>-->
                </div>
                <div class="add_graphics">
                    <a href="javascript:void(0);" class="pre_menu_link add_graphics_btn" title="">
                        <i class="icon14_menu_add"></i>
                    </a>
                </div>
            </div>
        </div>
    </div>

    <div class="senior_graphics_edit">
        <form class="form-horizontal">
            <fieldset>
                <div class="control_line">
                    <label><span class="must"></span>标题：</label>
                    <input type="text" placeholder="请输入标题…" class="graphics_title" maxlength="64">
                    <span id="title-error" class="help-inline error-message">这是必填字段</span>
                </div>
                <div class="control_line">
                    <label>摘要：</label>
                    <textarea class="graphics_textarea" maxlength="120"></textarea>
                </div>
                <div class="control_line">
                    <label><span class="must"></span>链接地址：</label>
                    <input type="text" class="graphics_link" placeholder="请输入链接地址（以http://开头）">
                    <span id="link-error" class="help-inline error-message">请输入链接地址</span>
                </div>
                <div class="control_line">
                    <label><span class="must"></span>封面图：</label>
                    <input class="hide graphics_img" type="text" name="logo" value="" readonly="readonly">
                    <img id="shop_logo" src="" class="img-polaroid btn-up" alt="logo" style="width: 64px; height: 64px;">
                </div>
            </fieldset>
        </form>
    </div>
</div>
<div class="form-actions text-center">
   <button type="button" class="btn btn-primary" id="senior_graphics_btn">保存</button>
</div>

<script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="/js/senior_graphics.js"></script>

<div style="display: none;" id="editor" class="edui-default"></div>
<script>
$(function(){
    var editor = UE.getEditor('editor',{isShow: false})
    $('#shop_logo').on('click', function(){
        var $img = $(this);
        var $input_url = $img.prev();
        editor.removeListener('beforeInsertImage');
        editor.addListener('beforeInsertImage', function (t, list) {
            $input_url.val(list[0]['src']);
            $img.attr('src', list[0]['src']);
            //设置预览的图片
            Senior.setImg(list[0]['src']);
        });
        
        editor.getDialog("insertimage").open();
    });


    Senior.init();
    //Senior.init([{"title":"北大硕士险被女网友骗30万 警方帮其保住28万","digest":"摘要，120个字符","link":"http://www.baidu.com","cover_url":"https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1260874108,1905919028&fm=80"},{"title":"跑男片酬他最高","digest":"摘要，120个字符","link":"http://www.xingyebao.com","cover_url":"https://ss0.baidu.com/6ONWsjip0QIZ8tyhnq/it/u=3634156512,1054194133&fm=80"}]);
});
</script>



